
package com.idealighter.game.group.handler;

import com.google.inject.Inject;

import com.idealighter.game.core.annotation.ReqMsgHandler;
import com.idealighter.game.group.manager.GroupMgr;
import com.idealighter.game.group.message.ReqFindMemberMsg;
import com.idealighter.game.message.ModuleMsgIdConstant;
import com.idealighter.game.message.core.ReqMessage;
import com.idealighter.game.message.core.ResMessage;
import com.idealighter.game.player.struct.Player;
import com.idealighter.game.server.handler.ReqMessageHandler;


@ReqMsgHandler(ModuleMsgIdConstant.Group.MEMBER_FIND_MEMBER)
public class ReqFindMemberHandler implements ReqMessageHandler {

  @Inject
  private GroupMgr groupMgr;

  @Override
  public ResMessage action(Player player, ReqMessage message) {
    ReqFindMemberMsg msg = (ReqFindMemberMsg) message;
    return groupMgr.findMember(player, msg.getGroupId(), msg.getToPlayerId());
  }
}
